package com.lin.dataobject;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.lin.utils.serializer.Date2LongSerializer;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by MYQ on 2017/8/28.
 */
@Entity
@DynamicUpdate
@Data
@Table(name = "product_category")
public class ProductCategory {
    @Id
    @GeneratedValue
    private Integer categoryId;

    private String categoryName;

    //
    private Integer categoryType;

    @JsonSerialize(using = Date2LongSerializer.class)
    private Date createTime;

}
